﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xc.DataAccess.Core;
using Xc.DataAccess.HyperTerminalCore.Services;

namespace Xc.Logics.HyperTerminalCore.Udp.ViewModels
{
    public class MainViewModel:ViewModelBase
    {
        UdpServerOption udpServerOption = new UdpServerOption();
        public UdpServerOption UdpServerOption
        {
            get => udpServerOption;
            set
            {
                if (udpServerOption == value)
                {
                    return;
                }

                udpServerOption = value;
                RaisedPropertyChanged();
            }
        }
        ObservableCollection<IUdpServerService> udpServers = new ObservableCollection<IUdpServerService>();
        public ObservableCollection<IUdpServerService> UdpServers
        {
            get => udpServers;
            set
            {
                if (udpServers == value)
                {
                    return;
                }

                udpServers = value;
                RaisedPropertyChanged();
            }
        }
        PackageInfo packageInfo;
        /// <summary>
        /// 升级包信息
        /// </summary>
        public PackageInfo PackageInfo
        {
            get => packageInfo;
            set
            {
                if (packageInfo == value)
                {
                    return;
                }

                packageInfo = value;
                RaisedPropertyChanged();
            }
        }
    }
}
